function t(t) {
    return t && t.__esModule ? t : {
        default: t
    };
}

function e(t, e, a) {
    return e in t ? Object.defineProperty(t, e, {
        value: a,
        enumerable: !0,
        configurable: !0,
        writable: !0
    }) : t[e] = a, t;
}

var a, i = t(require("../../../utils/filter.js")), n = t(require("../../../utils/util.js"));

Component({
    options: {
        multipleSlots: !0
    },
    properties: {
        activeStar: {
            type: Number,
            value: 0
        },
        feedbackDatum: {
            type: Object,
            value: "default value"
        },
        cancelText: {
            type: String,
            value: "取消"
        },
        confirmText: {
            type: String,
            value: "确定"
        }
    },
    data: {
        starMap: [ "非常差", "差", "一般", "不错", "非常棒" ],
        comment: "",
        tag_id_list: []
    },
    ready: function(t) {
        if (!this.selectComponent) throw new Error("小程序sdk暂不支持节点操作selectComponent");
        this.baseModal = this.selectComponent("#baseModal");
    },
    methods: (a = {
        show: function() {
            this.triggerEvent("scrollEvent", {
                noScroll: !0
            }), this.baseModal.showModal();
        },
        hide: function() {
            this.triggerEvent("scrollEvent", {
                noScroll: !1
            }), this.baseModal.hideModal();
        },
        onImageError: function(t) {
            var e = this;
            n.default.errImgFun(t, e);
        },
        bindRateStar: function(t) {
            var e = parseInt(t.target.dataset.activeStar) || 0;
            this.triggerEvent("changeRateStar", {
                activeStar: e
            });
        },
        _cancelModal: function() {
            this.hide(), this.triggerEvent("cancelEvent");
        },
        handleChange: function(t) {
            var e = t.detail.value;
            this.data.comment = e;
        },
        setBasicTag: function(t) {
            var e = t.currentTarget.dataset.value;
            this.data.tag_id_list.push(e), this.data.tag_id_list = i.default.unique(this.data.tag_id_list), 
            this.triggerEvent("changeBasicTag", {
                tag_id_list: this.data.tag_id_list
            });
        }
    }, e(a, "onImageError", function(t) {
        var e = this;
        n.default.errImgFun(t, e);
    }), e(a, "_confirmModal", function() {
        this.triggerEvent("confirmEvent", {
            public_basic_vote_tag_id_list: this.data.tag_id_list,
            score: this.data.activeStar,
            comment: this.data.comment
        }), this.hide();
    }), a)
});